<% form_for(@electeur, @user) do |f| %>
    <%= f.error_messages %>

    <p>
      <%= f.label :nom %><br />
      <%= f.text_field :nom %>
    </p>
    <p>
      <%= f.label :prenom %><br />
      <%= f.text_field :prenom %>
    </p>
    <p>
      <%= f.label :naissance %><br />
      <%= f.date_select :naissance,:start_year=>1900,:end_year=>(Date.today.year-18),:use_month_numbers=>false,:order=>[:day,:month,:year] %>
    </p>
    <p>
      <%= f.label :departement %><br />
      <%= f.select :departement, tab_departement.sort().collect {|p| [p[1], p[0]]} %>
    </p>
    <p>
      <%= f.label :sexe %><br />
      <%= f.radio_button :sexe,'Homme',:checked=>true %> Homme
      <%= f.radio_button :sexe,'Femme' %> Femme
    </p>
    <p>
      <% unless edit %>
          <% f.fields_for :user_attributes, @user do |user_form| %>
              <%= render :partial => 'users/user', :locals => {:user_form => user_form} %>
          <% end %>
      <%end %>
    </p>
    <p>
      <%= f.submit button_name %>
    </p>
<% end %>